package main

import (
	"fmt"
)

/*func main() {
	ch := make(chan int) //双向channel

	var writeCh chan<- int = ch
	writeCh <- 18

	var readCh <-chan int =ch
	num:=<-readCh
	fmt.Println(num)
}*/

func main(){
	ch:=make(chan int)
	go func() {
		write(ch)
	}()
	recv(ch)
}

func recv(in <-chan int){
	n:=<-in
	fmt.Println(n)
}

func write(out chan<- int){
	out<-99
}